<#assign pageName="系统平台管理">
<@override name="page-content">
<form class="layui-form form-horizontal" role="form" method="post">
     <div class="layui-form-search panel">
         <input type="text" hidden="hidden" name="_STATE"/>
         <@ctrl.SingleSelectQuery path="guids.status" options={"T":"启用","F":"禁用"} text="1" value="0" labelText="启用状态">
             <option value="">—请选择启用状态—</option>
         </@ctrl.SingleSelectQuery>
         <div class="margin-5"> 
             <a href="javascript:;" onclick="$('form:first').submit();" class="layui-btn layui-btn-sm">
                    <i class="layui-icon layui-icon-search"></i>查询
                </a>
                <a href="add" class="layui-btn layui-btn-normal layui-btn-sm">
                    <i class="layui-icon layui-icon-add-1"></i>新增
                </a>
        </div>
    </div>
    <table class="layui-table">
            <thead>
                <tr>
                    <th class="align-center" width="50px" nowrap="nowrap">序号</th>
                    <th class="align-center" nowrap="nowrap">平台类型</th>
                    <th class="align-center" nowrap="nowrap">平台编码</th>
                    <th class="align-center" nowrap="nowrap">平台GUID</th>
                    <th class="align-center" nowrap="nowrap">平台名称</th>
                    <th class="align-center" nowrap="nowrap">当前版本</th>
                    <th class="align-center" nowrap="nowrap">启用状态</th>
                    <th class="align-center" width="100px">操作</th>
                </tr>
            </thead>

            <tbody>
            <#if guidsList?has_content>
                <@ctrl.Recursive dataList=guidsList![] fieldID='guid' fieldParentID='upperGuid' parentidValue='-1'; dataItem,level,separator,dataIndex>  
                <tr>
                    <td class="align-center" width="50px" nowrap="nowrap">
                        ${dataIndex}
                    </td>
                    <td class="align-center">
                        <#if dataItem.sysModuleType == "1">业务平台
                        <#elseif dataItem.sysModuleType == "-1">标识平台
                        </#if>
                    </td>
                    <td class="align-center" nowrap="nowrap">
                        ${dataItem.sysModuleCode}
                    </td>
                    <td nowrap="nowrap">
                        ${dataItem.guid}
                    </td>
                    <td nowrap="nowrap">
                        <#if level gt 0><#list 1..level as i>${separator}</#list></#if>
                        ${dataItem.sysModuleName}
                    </td>
                    <td class="align-center">
                        ${dataItem.versionNo}
                    </td>
                    <td class="align-center">
                        <#if dataItem.status == 'T'>
                            <span class="layui-bg-green status-show">启用</span>
                        <#elseif dataItem.status == 'F'>
                            <span class="layui-bg-red status-show">禁用</span>
                        </#if>
                    </td>
                    <td class="align-center">
                        <div class="layui-table-cell">
                            <a class="layui-btn layui-btn-normal layui-btn-xs" href="edit/${dataItem.guid}">
                                <i class="layui-icon layui-icon-edit"></i>编辑
                             </a> 
                             <button type="button" class="layui-btn layui-btn-danger layui-btn-xs"
                                onclick="confirmSubmit('确定要删除平台‘${dataItem.sysModuleName}’吗？', {guid:'${dataItem.guid}', title:'${dataItem.sysModuleName}'},'del')">
                                <i class="layui-icon layui-icon-delete"></i>删除
                            </button>
                        </div>
                    </td>
                </tr>
                </@ctrl.Recursive>
            <#else>
                <tr>
                    <td colspan="8" style="color:red;text-align:center;font-weight:bold;">暂无符合条件的平台信息</td>
                </tr>
            </#if>
            </tbody>
        </table>
    </form>
</@override>
<@override name="page-scripts">
    <script>
        $(function(){
            layui.use(['form','layer', 'jquery'], function(){
                var form=layui.form;
                var layer=layui.layer;
                var $ = layui.jquery;
            })
        })
    </script>
</@override>
<@extends name="/layout/basepage.html"/> 